﻿using System.Data.Entity.ModelConfiguration;
using QDT.Core.Deals;

namespace QDT.Core.MSData.Mapping
{
    public class DealOfRepayMapping : EntityTypeConfiguration<DebtorRepayment>
    {
        public DealOfRepayMapping()
        {
            HasKey(x => x.ID);

            Ignore(x=>x.Remark);

            Ignore(x => x.HasReply);

            Property(x => x.ProjectID).HasColumnName("deal_id");

            Property(x => x.UserID).HasColumnName("user_id");

            Property(x => x.SelfMoney).HasColumnName("repay_self_money");

            Property(x => x.RepayMoney).HasColumnName("repay_money");

            Property(x => x.ManageMoney).HasColumnName("manage_money");

            Property(x => x.RepayTime).HasColumnName("repay_time");

            Property(x => x.TrueRepayTime).HasColumnName("true_repay_time");

            Property(x => x.InnerStatus).HasColumnName("status");

            Property(x => x.Stage).HasColumnName("stage");

//            Ignore(x=>x.Stage);

            ToTable(DB.TPref("deal_repay"));
        }
    }
}
